/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package utilities.entities;

/**
 *
 * @author olawale
 */
public class Selection {

    public Selection(RatedColumn column, boolean selected, String []  cValue){
        this.column = column;
        this.selected = selected;
        this.compareValue = cValue;
    }


    private boolean selected;
    private String[] compareValue;
//    private Object actualValue;
    private RatedColumn column;
    private int point;


    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean sel){
        selected = sel;
    }

    public String[] getCompareValue() {
        return compareValue;
    }

//    public Object getActualValue() {
//        return actualValue;
//    }
//
//    public void setActualValue(Object actualValue) {
//        this.actualValue = actualValue;
//    }

    public RatedColumn getColumn() {
        return column;
    }

    public void increasePoint(){
        ++point;
    }

    public void resetPoint(){
        point = 0;
    }

    public String getPoint(){
        return "";
    }

    public boolean isEmpty(){
        if(compareValue == null || compareValue.length == 0)
            return false;
        for(String s : compareValue){
            if(!s.isEmpty())
                return true;
        }
        return false;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Selection)) {
            return false;
        }
        Selection other = (Selection) obj;
        if ((this.column == null && other.column != null) ||
                (this.column != null && !this.column.equals(other.column))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 53 * hash + this.point;
        return hash;
    }


}
